#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2017/3/21 17:01
# @Author  : Aries
# @Site    : 
# @File    : 2.py
# @Software: PyCharm

from pymongo import MongoClient
import gridfs

db=MongoClient().gridfs_example#链接默认的host和port

fs = gridfs.GridFS(db)

a = fs.put(b"hello world")

print(fs.get(a).read())

